//保存待计划
function submitTc1() {
    var followStatus=$("#followStatus").val();
    var consumptionStatus=$("#consumptionStatus").val();
    var revisit=$("#revisit").val();
    var remarks=$("#remarks2").val();
    var revisitContent=$("#revisitContent").val();
    var reservationsId=$("#reservationsId").val();
    var customerId=$("#customerId").val();
    var revisitTime=$("#revisitTime").val();
    var params = {
        followStatus: followStatus,
        consumptionStatus: consumptionStatus,
        revisit: revisit,
        remarks: remarks,
        revisitContent: revisitContent,
        reservationsId:reservationsId,
        customerId:customerId,
        revisitTime: revisitTime
    };
    if (revisitTime== null || revisitTime== "") {
        alert("请选择计划回访时间!");
        return false;
    }
    if (followStatus== null || followStatus== "") {
        alert("请选择跟踪状态!");
        return false;
    }
    if (consumptionStatus == null ||consumptionStatus == "") {
        alert("请选择消费状态!");
        return false;
    }
    if (revisit== null || revisit== "") {
        alert("请选择回访人员!");
        return false;
    }
    if (remarks== null || remarks== "") {
        alert("请填写回访计划!");
        return false;
    }
    $.ajax({
        url: Feng.ctxPath + "/tcRevisit/addTcContent2",
        type: "post",
        data: params,
        success: function (data) {
            Feng.success('操作成功!');
            window.location.href = Feng.ctxPath + "/tcPatientsCentral/tcPatient_returnVisit/"+$("#reservationsId").val();
        }
    });
};

//完成回访
function submitTc2() {
    var followStatus=$("#followStatus").val();
    var consumptionStatus=$("#consumptionStatus").val();
    var revisit=$("#revisit").val();
    var remarks=$("#remarks2").val();
    var revisitContent=$("#revisitContent").val();
    var reservationsId=$("#reservationsId").val();
    var customerId=$("#customerId").val();
    var revisitTime=$("#revisitTime").val();
    var params = {
        followStatus: followStatus,
        consumptionStatus: consumptionStatus,
        revisit: revisit,
        remarks: remarks,
        revisitContent: revisitContent,
        reservationsId:reservationsId,
        customerId:customerId,
        revisitTime: revisitTime
    };
    if (revisitTime== null || revisitTime== "") {
        alert("请选择计划回访时间!");
        return false;
    }
    if (followStatus== null || followStatus== "") {
        alert("请选择跟踪状态!");
        return false;
    }
    if (consumptionStatus == null ||consumptionStatus == "") {
        alert("请选择消费状态!");
        return false;
    }
    if (revisit== null || revisit== "") {
        alert("请选择回访人员!");
        return false;
    }
    if (remarks== null || remarks== "") {
        alert("请填写回访计划!");
        return false;
    }
    if (revisitContent== null ||revisitContent=="") {
        alert("请填写回访结果!");
        return false;
    }
    $.ajax({
        url: Feng.ctxPath + "/tcRevisit/addTcContentOver",
        type: "post",
        data: params,
        success: function (data) {
            Feng.success('操作成功!');
            window.location.href = Feng.ctxPath + "/tcPatientsCentral/tcPatient_returnVisit/"+$("#reservationsId").val();
        }
    });
};

function patient_backHome () {  ////点击返回跳转页面 - 首页
    window.location.href = Feng.ctxPath + "/weixin/index";
}